import sequelize from '../config/sequelize';
import Sequelize from 'sequelize';
const NoteModel = sequelize.define(
  'Note',
  {
    //   id
    id: {
      allowNull: false,
      autoIncrement: true,
      primaryKey: true,
      type: Sequelize.INTEGER,
    },
    // 名
    name: {
      type: Sequelize.STRING(20),
      allowNull: false,
    },
    // 所属文件夹ID
    folderId: {
      type: Sequelize.INTEGER,
      allowNull: false,
    },
    // 笔记内容
    noteContent: {
      type: Sequelize.TEXT,
    },
    // 创建人
    ownerId: {
      type:Sequelize.INTEGER,
      allowNull:true
    }
  },
  {
    tableName: 'Note',
  },
);
export default NoteModel;
